package sentStruct;

import java.util.ArrayList;
import java.util.List;



public class Noun extends PartOfSpeech{
	
	public PartOfSpeech preposition ;
	
	public Noun() {
		super();
		
	}
	
	

	public PartOfSpeech getPreposition() {
		return preposition;
	}



	public void setPreposition(PartOfSpeech preposition) {
		this.preposition = preposition;
	}



	public Noun(String value) {
		super(value);
	}

	private List<Adjective> adjectives;

	public List<Adjective> getAdjectives() {
		return adjectives;
	}

	public void setAdjectives(List<Adjective> adjectives) {
		this.adjectives = adjectives;
	}
	
	public void addAdjective(Adjective adjective){
		if (this.adjectives==null)
			this.adjectives= new ArrayList<Adjective>();
		this.adjectives.add(adjective);
			
	}
	public String toString(){
		String adj="";
		if (this.adjectives!=null) {
			adj= " ADJECTIVE(S): ";
			for (Adjective a: adjectives )
				adj+=a+" ";
		}
		return super.toString()+adj;
	}
	
    public boolean hasAdjectives(){
		
		if (this.adjectives!=null&&this.adjectives.size()!=0)
			return true;
		else return false;
	}


}
